<template>
  <button
    class="custom-btn"
    :class="{
      disabled: disabled,
      'custom-btn-primary': type === 'primary',
      'custom-btn-small': size === 'small',
    }"
    :disabled="disabled"
    @click="handleClick"
  >
    <view class="custom-btn-inner"> <slot></slot> </view>
  </button>
</template>

<script>
  export default {
    props: {
      type: {
        type: [String, Number],
        default: 0,
      },
      disabled: {
        type: Boolean,
        default: false,
      },
      size: {
        type: String,
        default: "", // small
      },
    },
    methods: {
      handleClick(e) {
        this.$emit("click", e);
      },
    },
  };
</script>

<style lang="scss" scoped></style>
